function setCookie(c_name,value,expiredays)//设置cookie
{
    var exdate=new Date()
    exdate.setDate(exdate.getDate()+expiredays)//设置过期时间
    document.cookie=c_name+ "=" +escape(value)+
        ((expiredays==null) ? "" : ";expires="+exdate.toGMTString())//设置cookie内容
}
function keyLogin(){
    if (event.keyCode==13){
        document.getElementById("bt").click(); //调用登录按钮的登录事件

    }  //回车键的键值为13

}
function load()
{
    var username=$("#number").val().trim();
    var pwd=$("#password").val().trim();
    // var $displayInfo=$(".check-form-error");
    $.ajax({
        url:"/administrator/login",
        type:"POST",
        data:{"account":username,
            "password":pwd},
        success:function(msg){
                setCookie('username',number)//给cookie取名为numbername，传值和过期时间
                setTimeout('location.href="enter.html";',0);

        },
        error:function(msg){
            document.getElementById("tishi").innerHTML="用户名或密码错误";
            //alert("用户名或密码错误");
        }

    })
}